#include <stdio.h>
#include "dulinklist.h"

Status DuLinkListInsert(DulNode *s, DuLinkList p)
{
    if (NULL == p || NULL == s)
    {
        return ERROR;
    }

    s->prior = p;
    s->next = p->next;
    p->next->prior = s;
    p->next = s;
    return OK;
}

Status DuLinkListDelete(DulNode *p)
{
    if (NULL == p)
    {
        return ERROR;
    }

    p->prior->next = p->next;
    p->next->prior= p->prior;
    free(p);
    return OK;
}